package com.andnnl.num;

/**
 * Created by chenss on 2021/8/26.
 */
public class CarxText {
    public static void main(String[] args) {

        for (int i = 0; i < 10; i++) {
            double carX = i * 6.75 - i / 2 * 4.5;
            System.out.println(carX);
        }

        System.out.println("------------------");
        for (int i = 0; i < 10; i++) {
            Double carX = i * 6.75;
            if (i > 1) {
                carX = carX - 4.5;
            }
            if (i > 3) {
                carX = carX - 4.5;
            }
            if (i > 5) {
                carX = carX - 4.5;
            }
            if (i > 7) {
                carX = carX - 4.5;
            }
            if (i > 9) {
                carX = carX - 4.5;
            }
            if (i > 11) {
                carX = carX - 4.5;
            }
            if (i > 13) {
                carX = carX - 4.5;
            }
            if (i > 15) {
                carX = carX - 4.5;
            }
            if (i > 17) {
                carX = carX - 4.5;
            }
            if (i > 19) {
                carX = carX - 4.5;
            }
            System.out.println(carX);
        }


    }
}
